package Y;

public class Student extends a {
    String b;
    String lesson;
    public Student(int id, String name, String sex,String lesson) {
        super(id, name, sex);
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.lesson=lesson;
    }

    public String toString() {
        return "编号" + id + "姓名" + name + "性别"+sex +"课程"+lesson;
    }

    void xuanke() {
        b = null;
    }

    void delete() {
        if (b == null) ;
        {
            System.out.println("这个学生没有选课");
        }
    }
}